<template>
  <div
    class="img-box user"
    :style="{
      width: width,
      'min-width': width,
      height: width,
      backgroundImage: `url(${
        img || require('@/../public/images/default-user.png')
      })`,
    }"
    v-if="userId"
  ></div>
</template>

<script>
export default {
  props: ["img", "width", "userId"],
};
</script>

<style lang="scss" scoped>
.user {
  border-radius: 50%;
  overflow: hidden;
}
</style>